package com.blithe.wgt.utils;

import android.content.Context;
import android.view.View;

/**
 *
 *@author blithe
 *create at 2017/12/1 0001 16:09
 */
public class UiUtils {


    /** 获取 布局对象 */
    public static View inflate(Context context, int layoutId){
        View view = View.inflate(context, layoutId, null);
        System.out.println("View_hsw:" + view);
        return view;
    }
    public static int Dp2Px(Context context, float dp) {
        final float scale = context.getResources().getDisplayMetrics().density;

        return (int) (dp * scale + 0.5f);
    }

}
